package com.cjl.learn.factory.factoryMethod.factory;


import com.cjl.learn.factory.factoryMethod.pizza.BJCheesePizza;
import com.cjl.learn.factory.factoryMethod.pizza.BJGreekPizza;
import com.cjl.learn.factory.factoryMethod.pizza.Pizza;
import com.cjl.learn.factory.simpleFactory.pizza.CheesePizza;

/**
 * Created by Enzo Cotter on 2019-08-14.
 */
public class BJPizzaFactory implements PizzaFactory {

    public Pizza createPizza(String type) {
        if ("greek".equals(type)) {
            return new BJGreekPizza(type);
        } else if ("cheese".equals(type)) {
            return new BJCheesePizza(type);
        }
        return null;
    }
}
